﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using SharedGenomics.Core;

namespace SharedGenomics.Workbench.Views.WindowsForms
{
    public partial class CategoryFilterSetView : View, ICategoryFilterSetView
    {
        public CategoryFilterSetView()
        {
            InitializeComponent();
        }

        public void AddFilterView(ICategoryFilterView filterView)
        {
            this.flpCategoryFilters.Controls.Add((Control)filterView);
        }

        public void RemoveFilterAt(int index)
        {
            this.flpCategoryFilters.Controls.RemoveAt(index);
        }

        public bool IsAddCategoryEnabled
        {
            get { return this.btAddCategory.Enabled;}
            set { this.btAddCategory.Enabled = value; }
        }

        public event EventHandler AddCategoryClicked;

        private void btAddCategory_Click(object sender, EventArgs e)
        {
            this.AddCategoryClicked.Raise(this);
        }
    }
}
